<?php
	session_start();
	session_destroy();
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		
		<title>Log In Page</title>
		<link rel="stylesheet" type="text/css" href="login.css" />
		<script type="text/javascript">
			function validate(){
				if(document.login.username.value=='' &&
				document.login.password.value=='') return false;
				else if(document.login.username.value==''){
					alert('Please enter a Username');
					return false;
				}
				else if(document.login.password.value==''){
					alert('Please enter your Password');
					return false;
				}
				else return true;
			
			}
		</script>
	</head>
	
	<body>
		<div id="logindiv">
			<form name="login" method="post" action="loginConnect.php" onsubmit="return validate()">
				<table>
					<tr>
						<td>Username</td>
							<td><input type="text" name="username" value="" /></td>
					</tr>
					<tr>
						<td>Password</td>
						<td><input type="password" name="password" value="" /></td>
					</tr>
					<tr>
						<td><input type="submit" value="Log in" /></td>
						<td><a href="create.php">Create new account</a></td>
					</tr>
			</table>
		</form>
	</div>
	</body>
</html>